<!-- 会员中心主内容区 -->
<div class="page-article">
  <!-- 到货通知 -->
  <div id="member_notify" class="member-notify">
    <div class="member-title">
      <h2><{t}>到货通知<{/t}></h2>
    </div>
    <div class="member-mod">
      <table class="member-grid">
        <thead>
          <th colspan="2"><{t}>商品名称<{/t}></th>
          <th><{t}>金额<{/t}></th>
          <th><{t}>状态<{/t}></th>
          <th><{t}>操作<{/t}></th>
        </thead>
        <tbody<{if !($browser.name=="IE" && ($brower.ver == 6 || $browser.ver == 7))}> class="first"<{/if}>>
          <{if $notify}>
          <{foreach from=$notify item=goods name=name}>
          <{if $goods.udfimg == 'true'}>
          <{assign var="gimage" value=$goods.thumbnail_pic}>
          <{else}>
          <{assign var="gimage" value=$goods.image_default_id|default:$defaultImage}>
          <{/if}>
          <tr<{if $smarty.foreach.name.iteration == 1}> class="first"<{/if}>>
            <td><div class="goods-pic"><{if !$goods.goods_name}><a href="<{link app=b2c ctl=site_product arg0=$goods.product_id}>" target="_blank"><{/if}><img src="<{$gimage|storager:'s'}>" alt="<{$goods.name}> <{$goods.spec_info|spec_desc}>"></a></div></td>
            <td class="goods-name"><{if !$goods.goods_name}><a href="<{link app=b2c ctl=site_product arg0=$goods.product_id}>" target="_blank"><{/if}><{$goods.name|default:$goods.goods_name}> <{$goods.spec_info|spec_desc}></a></td>
            <td><{t}>现价<{/t}>：<ins class="price"><{$goods.price.price.price|default:$goods.goods_price|cur_odr}></ins><br><del><{t}>原价<{/t}>：<{$goods.price.mktprice.price|default:$goods.goods_price|cur_odr}></del></td>
            <td class="status"><{if $goods.marketable == 'true'}><{if $goods.store > 0}><{t}>有货<{/t}><{else}><span class="text-disabled"><{t}>缺货<{/t}></span><{/if}><{elseif $goods.marketable=='false'}><{t}>下架<{/t}><{else}><{t}>商品已删除<{/t}><{/if}></td>
            <td class="actions">
              <{if $goods.store > 0}>
              <a href="<{link app=b2c ctl=site_cart act=add arg0=goods arg1=$goods.goods_id arg2=$goods.product_id arg3=1}>" class="btn btn-major action-addtocart" target="_dialog_minicart"><span><span><{t}>加入购物车<{/t}></span></span></a>
              <{/if}>
              <i class="separator"></i><a href="<{link app=b2c ctl=site_member act=del_notify arg0=$goods.product_id}>" class="action-delete">移除</a>
            </td>
          </tr>
          <{/foreach}>
          <{else}>
          <tr class="first"><td colspan="5" class="no-information"><{t}>暂无登记缺货的商品<{/t}></td></tr>
          <{/if}>
        </tbody>
      </table>
    </div>
    <{pagers data=$pager}>
  </div>
</div>
<script>
var notify = $('member_notify');
notify.addEvents({
    'click:relay(.action-delete)': function(e) {
        e.stop();
        var url = this.href;
        var self = this;
        Dialog.tips('确定移除该商品？', this, function(e) {
            if(!e) return;
            async(self, {
                progress: function(rs) {
                    if(rs.error) return Message.error(rs.error);
                    location.reload();
                }
            });
        });
    }
});
</script>
